<template> 
    <div class="app-container">
        <el-card class="operate-container" shadow="never">
            <i class="el-icon-tickets"></i>
            <span>数据列表</span>
        </el-card>
        <div class="table-container">
            <el-table ref="deliverOrderTable"
                      style="width: 100%;"
                      :data="list" v-loading="listLoading" border>
                <el-table-column label="订单编号" width="180" align="center">
                    <template slot-scope="scope">{{scope.row.orderSn}}</template>
                </el-table-column>
                <el-table-column label="收货人" width="180" align="center">
                    <template slot-scope="scope">{{scope.row.shipName}}</template>
                </el-table-column>
                <el-table-column label="手机号码" width="160" align="center">
                    <template slot-scope="scope">{{scope.row.shipMobile}}</template>
                </el-table-column>
                <el-table-column label="邮政编码" width="160" align="center">
                    <template slot-scope="scope">{{scope.row.shipPostCode}}</template>
                </el-table-column>
                <el-table-column label="收货地址" align="center">
                    <template slot-scope="scope">{{scope.row.shipAddress}}</template>
                </el-table-column>
                <el-table-column label="配送方式" width="160" align="center">
                        <template slot-scope="scope">{{scope.row.logiName}}</template>
                </el-table-column>
                <el-table-column label="物流单号" width="180" align="center">
                    <template slot-scope="scope">{{scope.row.logiNo}}</template>
                </el-table-column>
            </el-table>
        </div>
        <div class="pagination-container">
            <el-pagination
                    background
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    layout="total, sizes,prev, pager, next,jumper"
                    :page-size="listQuery.pageSize"
                    :page-sizes="[5,10,15]"
                    :current-page.sync="listQuery.pageNum"
                    :total="total">
            </el-pagination>
        </div>
    </div>
</template>
<script>
    import {getBillDeliveryList} from '@/api/order'
    import {formatDate} from '@/utils/date';

    export default {
        name: 'omsPaymentsList',
        data() {
            return {
                operates: [],
                operateType: null,
                listQuery: {
                    pageNum: 1,
                    pageSize: 10
                },
                list: null,
                total: null,
                listLoading: true,
                multipleSelection: []
            }
        },
        created() {
            this.getList();
        },
        filters: {
            formatCreateTime(time) {
                let date = new Date(time);
                return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
            },

            formatStatus(value) {
                if (value === 1) {
                    return '启用';
                } else {
                    return '禁用';
                }
            },
        },
        methods: {
            getList() {
                this.listLoading = true;
                getBillDeliveryList(this.listQuery).then(response => {
                    this.listLoading = false;
                    this.list = response.data.records;
                    this.total = response.data.total;
                    this.totalPage = response.data.pages;
                    this.pageSize = response.data.size;
                });

            },

            handleSizeChange(val) {
                this.listQuery.pageNum = 1;
                this.listQuery.pageSize = val;
                this.getList();
            },
            handleCurrentChange(val) {
                this.listQuery.pageNum = val;
                this.getList();
            },
        }
    }
</script>
<style rel="stylesheet/scss" lang="scss" scoped>


</style>


